//
//  @ Project : Galaxy Star Trading System
//  @ File Name : CtpConvert.h
//  @ Date : 2014/9/5
//  @ Author :
//
//


#if !defined(_CCONVERT_H_H)
#define _CCONVERT_H_H


#include "api/ThostFtdcTraderApi.h"
#include "api/ThostFtdcUserApiDataType.h"
#include "api/ThostFtdcUserApiStruct.h"

namespace GSTrader
{
	namespace TradeService
	{
		class CCtpConvert
		{
		public:
			CCtpConvert();
			virtual ~CCtpConvert();

		public:
			void ConvertInputOrder(CThostFtdcInputOrderField* pOrder, COrder* pTheData);
			void ConvertOrder(CThostFtdcOrderField* pOrder, COrder* pTheData);
			void ConvertTrade(CThostFtdcTradeField* pTrade, CTrade* pTheData);
			void ConvertTradingAccount(CThostFtdcTradingAccountField* pTradingAccount, CTradingAccount* pTheData);
			void ConvertMaxOrderVolume(CThostFtdcQueryMaxOrderVolumeField* pMaxOrderVolume, CTradingMaxVolume* pTheData);
			void ConvertMarketData(CThostFtdcDepthMarketDataField* pDepthMarketData, CDepthMarketData* pMarketData);
			void ConvertPositionDetail(CThostFtdcInvestorPositionDetailField* pPositionDetail, CPositionDetail* pTheData);
			void ConvertPosition(CThostFtdcInvestorPositionField* pInvestorPosition, CPosition* pTheData);
			void ConvertInstrument(CThostFtdcInstrumentField* pInstrument, CInstrument* pThedata);
			void ConvertExchangeStatus(CThostFtdcInstrumentStatusField* pStatus, CExchangeStatus* pTheData);
			void ConvertSettlementInfo(CThostFtdcSettlementInfoField* pSettlementInfo, CSettlementInfo* pTheData);
			void ConvertMarginRate(CThostFtdcInstrumentMarginRateField* pInstrumentMarginRate, CMarginRate* pTheData);
			void ConvertCommissionRate(CThostFtdcInstrumentCommissionRateField* pInstrumentCommissionRate, CCommissionRate* pTheData);
			void ConvertAccountRegisterBank(CThostFtdcAccountregisterField *pAccountregister, CAccountRegisterBank* pTheData);
			void ConvertTransferBank(CThostFtdcTransferBankField* pTransferBank, CTransferBank* pTheData);
			void ConvertRspTransferField(CThostFtdcRspTransferField* pTransfer, CAccountTransfer* pTheData);
			void ConvertAccountMoney(CThostFtdcNotifyQueryAccountField* pAccount, CAccountMoney* pTheData);
			void ConvertTransferSerial(CThostFtdcTransferSerialField* pTransfer, CAccountTransferSerial* pTheData);
		};
	}
}

#endif // _CCONVERT_H_H

